package com.example.fitnessservice.module.utils;

/**
 * @author feng
 * @version 1.0
 * @&#064;description: TODO
 * @&#064;date 2022/11/21 20:10
 */
public class DistanceUtils {
    public static Double getDistance(double longitude1, double latitude1, double longitude2, double latitude2) {
        double longitudeDif = Math.abs(longitude2 - longitude1) * 100000;
        double latitudeDif = Math.abs(latitude2 - latitude1) * 1.1 * 100000;
        return Math.sqrt(longitudeDif * longitudeDif + latitudeDif * latitudeDif);
    }
}
